package com.tuanzi.loan.business.service.statistics.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tuanzi.loan.business.repository.statistics.custom.ExternalLoanAreaStatistisCustomRepository;
import com.tuanzi.loan.business.service.statistics.ExternalLoanAreaStatistisService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.ExternalLoanAreaStatistisRequest;
import com.tuanzi.loan.vo.response.statistics.ExternalLoanAreaStatistisResponse;

/**
* @author chenweijun 
* @version 2018年4月25日
*/
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class ExternalLoanAreaStatistisServiceImpl implements ExternalLoanAreaStatistisService{
	
	@Autowired
	private ExternalLoanAreaStatistisCustomRepository externalLoanAreaStatistisCustomRepository;

	@Override
	public Page<ExternalLoanAreaStatistisResponse> list(PageSearcher<ExternalLoanAreaStatistisRequest> pageSearcher) {
		return externalLoanAreaStatistisCustomRepository.list(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
	}

}
